﻿using System.Security;
using CozeDomain.Entities;
using CozeDto.AdminDtos;
using CozeDto.UserDtos;
using D.UtilCore.Dtos;
using D.UtilFreesqlOrm;

namespace CozeDomain.IServices
{
    /// <summary>
    /// 用户接口
    /// </summary>
    public interface IUserService : IBaseService<UserEntity>
    {
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="reqAddUser"></param>
        /// <returns></returns>
        Task<ApiResult<int>> AddUserAsync(ReqAddUser reqAddUser);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task<ApiResult<int>> DeleteUserAsync(List<string> ids);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="reqUpdateUser"></param>
        /// <returns></returns> 
        Task<ApiResult<int>> UpdateUserAsync(ReqUpdateUser reqUpdateUser);

        /// <summary>
        /// 修改支付二维码
        /// </summary>
        /// <param name="reqUpdateUser"></param>
        /// <returns></returns>
        Task<ApiResult<int>> UpdateUserPaymentQRCodeAsync(ReqUpdatePaymentQRCode reqUpdateUser);

        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="reqUpdatePwd"></param>
        /// <returns></returns>
        Task<ApiResult<int>> UpdatePwdAsync(ReqUpdateUserPwd reqUpdatePwd);

        /// <summary>
        /// 单个查询
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns> 
        Task<ApiResult<RepUserInfo>> GetUserAsync(string id);

        /// <summary>
        /// 修改状态
        /// </summary>
        /// <param name="id"></param>
        /// <param name="reqChangeStatus"></param>
        /// <returns></returns>
        Task<ApiResult<int>> ChangeStatusAsync(ReqChangeStatus reqChangeStatus);

        /// <summary>
        /// 获取列表
        /// </summary>
        /// <returns></returns>
        Task<ApiResult<List<RepUserInfo>>> QueryUserListAsync();

        /// <summary>
        /// 分页查询
        /// </summary>
        /// <param name="reqQueryUserPage"></param>
        /// <returns></returns>
        Task<ApiResult<PageModel<RepUserInfo>>> QueryUserPagesAsync(ReqQueryUserPage reqQueryUserPage);

        /// <summary>
        /// 获取个人中心金额统计
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<ApiResult<RepUserAccount>> GetUserAccountAsync(string userId);

        /// <summary>
        /// 获取我的团队
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<ApiResult<List<RepUserTeam>>> QueryMyTeamAsync(string userId);

        /// <summary>
        /// 普通登录
        /// </summary>
        /// <param name="account"></param>
        /// <param name="pwd"></param>
        /// <returns></returns>
        Task<ApiResult<string>> LoginAsync(string account, string pwd);

        /// <summary>
        /// 刷新token
        /// </summary>
        /// <param name="account"></param>
        /// <param name="pwd"></param>
        /// <returns></returns>
        Task<ApiResult<string>> RefreshTokenAsync(string token);

        /// <summary>
        /// 微信小程序登录
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        Task<ApiResult<string>> WxLoginAsync(string code);
    }
}
